package com.heatup.apt.common.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.mapper.AutoMapper;
import com.heatup.apt.model.order.OrderDetail;
import com.heatup.apt.model.order.OrderSelfCountInfo;
import com.heatup.apt.model.order.PrivateConsultOrderApiModel;

@Component
public interface OrderDetailMapper extends AutoMapper<OrderDetail>{

    int querySelfOrderCountBy(@Param("storeId") Integer storeId,@Param("startTime") String startTime);
    
    /**
     * 查询2天内的高峰自助健身的订单量 包含
     *
     * @param storeId 门店 ID
     * @return 2天内的高峰自助健身订单
     */
    OrderSelfCountInfo querySelfOrderCountFor2days(int storeId);
    
    /**
     * 根据订单Id查询订单
     * @param orderId
     * @return
     */
    OrderDetail queryOrderDetailByOrderId(Integer orderId);
    
    Map<String,Object> queryOrderDetailMapByOrderId(Integer orderId);
    
    /**
     * 获取用户私教咨询订单列表
     * @param orderId
     * @return
     */
    List<PrivateConsultOrderApiModel> queryUserPrivateConsultOrderListByUserId(Integer userId);
}